#ifndef XPM_DOC_MODEL_SDF_CONNOATION_H
#define XPM_DOC_MODEL_SDF_CONNOATION_H
// connotatin types
#define SDF_NULL '\0'
#define SDF_ARRAY '\5'
#define SDF_OBJECT '\6'

#include <string>
#include <vector>
#include <map>

namespace xpm {
	class SDFSign;	
	class SDFConnotation {
	public:		
		typedef std::vector<SDFSign*>::iterator iterator;
		SDFConnotation(int type): _type(type) {}
		SDFConnotation():_type(SDF_NULL) {}
		~SDFConnotation();
		SDFConnotation::iterator begin();
		SDFConnotation::iterator end();		
		int type();
		void set_type(int type);
		// apis 
		int size();
		bool empty();
		void push_back(SDFSign* sign);
		void clear();
		SDFSign* at(int index);
		// apis for object

		// apis for array
	private:
		std::vector<SDFSign*> _items;
		int _type;
	};
	inline int SDFConnotation::type() {
		return _type;
	}
	
	inline bool SDFConnotation::empty() {
		if (size() == 0)
			return true;
		else
			return false;
	}
	inline int SDFConnotation::size() {
		return _items.size();
	}
	inline SDFConnotation::iterator SDFConnotation::begin() {
		return _items.begin();
	}
	inline SDFConnotation::iterator SDFConnotation::end() {
		return _items.end();
	}
	inline void SDFConnotation::push_back(SDFSign* sign) {
		_items.push_back(sign);
	}
	inline SDFSign* SDFConnotation::at(int index) {
		return _items[index];
	}
}
#endif